//引入
import { createStore, combineReducers } from "redux";
import { counterReducer } from "./counterReducer";
import { todoReducer } from "./todoReducer"

//创建store函数
//store包含2部分：所有reducer  所有组件的state
//参数1:合并后的reducer
//参数2:合并后的state

//合并所有的reducer
const rootReducer = combineReducers({
    counterReducer: counterReducer,
    todoReducer: todoReducer
});
//合并所有的state--状态
const iniitalState = {

};
//创建store函数
const store = createStore(rootReducer, iniitalState);
export default store;